CREATE PROC babel_4214_datetime_to_int_proc
AS
SELECT CAST(CAST('1900-01-10 11:09:58.382' AS DATETIME) AS INT);
GO

CREATE FUNCTION babel_4214_datetime_to_int_function()
RETURNS INT AS
BEGIN
    RETURN (SELECT CAST(CAST('1900-01-10 11:09:58.382' AS DATETIME) AS INT))
END
GO

CREATE PROC babel_4214_smalldatetime_to_int_proc
AS
SELECT CAST(CAST('1900-01-10 11:09:58.382' AS SMALLDATETIME) AS INT);
GO

CREATE FUNCTION babel_4214_smalldatetime_to_int_function()
RETURNS INT AS
BEGIN
    RETURN (SELECT CAST(CAST('1900-01-10 11:09:58.382' AS SMALLDATETIME) AS INT))
END
GO
